<html>
<head>
<script>
window.addEventListener("beforeunload", function (event) {
  window.history.replaceState(null, "", "beforeunload_replacestate_2.html");
});
</script>
</head>
<body>
</body>
</html>
